﻿using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;

namespace Flare.Controls
{
    class FlameButtonInfo : Button
    {
        public FlameButtonInfo() : base() {
            this.LostFocus += (s, e) => { 
                LedVisibility = System.Windows.Visibility.Collapsed; 
            };
        }

        public System.Windows.Visibility LedVisibility
        {
            get
            {
                return (System.Windows.Visibility)this.GetValue(LedVisibilityProperty); 
            }

            set
            { 
                this.SetValue(LedVisibilityProperty, value); 
            }
        }

        public static readonly DependencyProperty LedVisibilityProperty = DependencyProperty.Register("LedVisibility", 
          typeof(System.Windows.Visibility), 
          typeof(FlameButtonInfo), 
          new PropertyMetadata(System.Windows.Visibility.Collapsed));

        public void ShowResult()
        {
            LedVisibility = System.Windows.Visibility.Visible;
        }
    }
}
